package jzq.spring.annotation;

import lombok.ToString;
import org.springframework.beans.factory.annotation.Required;

/**
 * @author jzq
 * @date 2019/3/14 13:58
 */
@ToString
public class Student {

    private String name;

    private Integer age;

    public String getName() {
        return name;
    }

    /**
     * 过时, 推荐使用构造器注入
     * 用于bean 属性的 setter 方法,   bean 属性在配置时必须放在 XML 配置文件中
     * @param name name
     */
//    @Required
    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

//    @Required
    public void setAge(Integer age) {
        this.age = age;
    }
}
